package com.hotel.tv.web.admin;

import com.autumn.swagger.annotation.ApiGroup;
import com.autumn.swagger.annotation.ApiHeaderParameter;
import com.autumn.swagger.annotation.EnableAutumnSwagger;
import com.autumn.web.annotation.EnableAutumnApiResponseBody;
import com.autumn.zero.authorization.annotation.EnableAutumnZeroAdminAuthorizationWeb;
import com.autumn.zero.authorization.annotation.EnableAutumnZeroAuthAuthorizationWeb;
import com.autumn.zero.authorization.annotation.EnableAutumnZeroSmsAuthAuthorizationWeb;
import com.autumn.zero.authorization.annotation.EnableAutumnZeroUrlPermissionInterceptor;
import com.autumn.zero.common.library.web.annotation.EnableAutumnZeroAdminCommonLibraryWeb;
import com.hotel.tv.web.AbstractHotelApplication;
import com.hotel.tv.web.admin.constants.AdminWebConstant;
import com.hotel.tv.web.configure.EnableWebStartupConfigure;

/**
 * 管理端启动
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-04-02 20:52
 **/
@EnableWebStartupConfigure
@EnableAutumnApiResponseBody({AdminWebConstant.CONTROLLER_PACKAGE_PATH})
@EnableAutumnSwagger(
        title = "珠江数码智能平台-管理端 API 文档",
        description = "",
        authorName = "珠江数码",
        authorUrl = "www.hotel.com",
        authorEmail = "",
        enableAuthorize = false,
        headerParameters = {
                @ApiHeaderParameter(name = "token", description = "token"),
                @ApiHeaderParameter(name = "deviceId", description = "设备id")
        },
        groups = {
                @ApiGroup(groupName = "所有", packages = AdminWebConstant.CONTROLLER_PACKAGE_PATH)
        }
)
@EnableAutumnZeroUrlPermissionInterceptor  //权限拦截，实现url权限配置
@EnableAutumnZeroAdminAuthorizationWeb  //管理端授权Web，后端资源管理、权限、日志的webApi等
@EnableAutumnZeroAdminCommonLibraryWeb  //管理端公共Web，后端的公共库管理、如系统配置、协议
@EnableAutumnZeroAuthAuthorizationWeb    //基本登录 用户名密码登录、注销
@EnableAutumnZeroSmsAuthAuthorizationWeb  //短信登录 提供短信登录
public class ApplicationAdminStartup extends AbstractHotelApplication {

    public ApplicationAdminStartup() {
        super();

    }

    /**
     * @param args
     */
    public static void main(String[] args) {
        //FormAuthenticationFilter a;
        //AbstractHandlerExceptionResolver rt;

        run(ApplicationAdminStartup.class, args);
    }
}
